package org.openmore.consumer.entity.enums;

import org.openmore.common.enums.BaseEnum;

import java.util.HashMap;
import java.util.Map;

/**应用状态*/
public enum TenantStatus implements BaseEnum<TenantStatus, String> {
    JUST_APPLY("JUST_APPLY", "申请开通"),
    REFUSE_APPLY("REFUSE_APPLY", "拒绝开通"),
    PASS_APPLY("PASS_APPLY", "申请通过");

    private String value;
    private String displayName;

    static Map<String, TenantStatus> enumMap = new HashMap<String, TenantStatus>();

    static {
        for (TenantStatus type : TenantStatus.values()) {
            enumMap.put(type.getValue(), type);
        }
    }

    private TenantStatus(String value, String displayName) {
        this.value = value;
        this.displayName = displayName;
    }

    @Override
    public String getValue() {
        return this.value;
    }

    @Override
    public String getDisplayName() {
        return this.displayName;
    }

    public static TenantStatus getEnum(String value) {
        return enumMap.get(value);
    }

}
